import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @version 1.8
 * @Author Djx_hmbb
 * @Date 2023/8/16 9:12
 * @注释:阻塞队列基本操作
 */
public class ThreadDemo18 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> blockingQueue = new LinkedBlockingQueue<>();
        blockingQueue.put("hello");//入队
        System.out.println(blockingQueue.take());//出队
        System.out.println(blockingQueue.take());
    }
}
